package com.example.aitoedu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 官方题库
 * @TableName TestBank
 */
@TableName(value ="TestBank")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Testbank implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 题目类型:1单选,2多选,3判断,4填空,5论述
     */
    @TableField(exist = true,value = "type")
    private Integer type;

    /**
     * 题目
     */
    private String question;

    /**
     * 选项
     */
    private String opt;

    /**
     * 非选择题答案
     */
    private String answer;

    /**
     * 判断答案,1正确,2错误
     */
    private Integer ajudge;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime createTime;

    /**
     * 若为选择则是选项个数,填空则为空的个数
     */
    private Integer number;

    /**
     * 题目分数
     */
    private Integer score;

    /**
     * 填空各空的分值
     */
    private String everyBlank;

    /**
     * 多选的少选的分值
     */
    private Integer shortChoose;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}